const authentication = require('../modules/loopback-core/boot/authentication');
const autoupdate = require('../modules/loopback-core/boot/autoupdate');
const providers = require('../providers');

module.exports = function setup(app, cb) {
  Promise.all([
    authentication(app)(providers),
    autoupdate(app)([app.dataSources.pg]),
  ])
  .then(() => process.nextTick(() => cb()))
  .catch(cb);
};
